<!--
 * @Author: 宋绍华
 * @Date: 2025-01-06 17:00:20
 * @LastEditors: 宋绍华
 * @LastEditTime: 2025-01-13 11:11:54
 * @FilePath: \sr_system_manager_ui\src\views\project\components\MyProject\ProjectPreview.vue
 * @Description: 
-->
<template>
  <div class="project-preview">
    <div class="project-preview__title">基本信息</div>
    <Edit mode="view" :isProposal="isProposal" :projectId="projectId" :projectNature="projectNature" ref="editRef" />
    <div class="project-preview__title  mt-20px">项目成员</div>
    <ProjectMember mode="view" :projectId="projectId" ref="projectMemberRef" />
    <div class="project-preview__title mt-20px">合作单位</div>
    <Cooperative mode="view" :projectId="projectId" ref="cooperativeRef" />
    <div class="project-preview__title mt-20px">预算信息</div>
    <ProjectBudget :show-tips="false" :projectNature="projectNature" mode="view" :projectId="projectId"
      ref="projectBudgetRef" />
    <div class="project-preview__title mt-20px">项目文档</div>
    <ProjectDoc pb-20px :show-tips="false" mode="view" :projectId="projectId" ref="projectDocRef" />
  </div>
</template>

<script setup lang="ts">
import Edit from './Edit.vue';
import ProjectMember from './ProjectMember.vue';
import Cooperative from './Cooperative.vue';
import ProjectBudget from './ProjectBudget.vue';
import ProjectDoc from './ProjectDoc.vue';

const props = defineProps({
  projectId: {
    type: String,
    default: ''
  },
  isProposal: {
    type: Boolean,
    default: false
  }
})
const route = useRoute()

const projectId = computed(() => props.projectId || route.query.projectId as string)

const projectNature = computed(() => {
  return Number(route.query.projectNature || 1)
})

</script>

<style scoped lang='scss'>
.project-preview {
  --at-apply: flex flex-col h-full mb-40px mt-30px w-[85%];

  &__title {
    --at-apply: text-20px font-bold py-16px flex justify-between;
  }
}
</style>